<style type="text/css">
    .tab-content {
        margin-bottom: 15px;
    }
</style>

<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input name="row[category_id_old]" type="hidden" value="{$row.category_id|htmlentities}">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-1"></label>
        <div class="col-xs-12 col-sm-9">
            <ul class="nav nav-tabs" role="tablist">
                <li role="presentation" class='{empty name="$row.url"}active{/empty}'>
                    <a href="#tab1" aria-controls="tab1" role="tab" data-toggle="tab">{:__('Add KBS')}</a>
                </li>
                <li role="presentation" class='{notempty name="$row.url"}active{/notempty}'>
                    <a href="#tab2" aria-controls="tab2" role="tab" data-toggle="tab">{:__('Introduce KBS')}</a>
                </li>
            </ul>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" data-multiple="true" class="form-control selectpage" data-source="workorder/category/index" data-field="name" name="row[category_id]" type="text" value="{$row.category_id|htmlentities}">
            <span class="help-block">{:__('Category_id Tip')}</span>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>

    <div class="tab-content">
        <div role="tabpanel" class='tab-pane fade{empty name="$row.url"} in active{/empty}' id="tab1">

            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50">{$row.content|htmlentities}</textarea>
                </div>
            </div>

            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-views" data-rule="required" class="form-control" name="row[views]" type="number" value="{$row.views|htmlentities}">
                </div>
            </div>

            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Likes')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-likes" data-rule="required" class="form-control" name="row[likes]" type="number" value="{$row.likes|htmlentities}">
                </div>
            </div>

            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Dislikes')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-dislikes" data-rule="required" class="form-control" name="row[dislikes]" type="number" value="{$row.dislikes|htmlentities}">
                </div>
            </div>
        </div>

        <div role="tabpanel" class='tab-pane fade{notempty name="$row.url"} in active{/notempty}' id="tab2">
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-url" class="form-control" name="row[url]" type="text" value="{$row.url|htmlentities}">
                    <span class="help-block">{:__('Url Tip')}</span>
                </div>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Memo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-memo" class="form-control" name="row[memo]" rows="3">{$row.memo|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status" }checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
